package Homework13;

public class Person {
    private String name;
    private int age;
    private char sex;

    public Person(String name, int age, char sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public String play(){
       return name + "爱玩";
    }
    //打印信息
    public void printInfo(){
        System.out.println("老师信息如下");
        System.out.println("姓名：" + name + "\n年龄：" + age + "\n性别：" +
                sex);
    }


}
